package com.yiren.backstage.config.bean.device;

import com.yiren.backstage.config.bean.BaseParamConfigBean;
import com.yiren.backstage.config.enums.CarTypeEnum;
import com.yiren.backstage.config.enums.GearTypeEnum;
import com.yiren.backstage.config.enums.LocationTypeEnum;
import com.yiren.backstage.config.enums.RoverStationEnum;
import com.yiren.backstage.config.enums.SpeedTypeEnum;

import org.apache.commons.lang.StringUtils;

/**
 * Created by WANGRONGXIANG
 * on 2022/5/18
 * Describe 信号源配置参数
 */
public class SignalSourceConfigBean extends BaseParamConfigBean {

    private GearTypeEnum gearType;    //档位类型 空档、档
    private RoverStationEnum roverStationType; //高精度移动站类型
    private SpeedTypeEnum speedType;  //车速获取方式
    private LocationTypeEnum locationType;     //定位模块类型 内置、外置
    private CarTypeEnum carType;      //车辆类型 C1、C2
    private Integer obdModel;             //OBD车型
    private String carModelId;        //高精度使用的车辆模型
    private boolean isMpDevice;       //是否是免破设备

    public static SignalSourceConfigBean getDefaultSignalSourceConfig() {
        SignalSourceConfigBean signalSourceConfig = new SignalSourceConfigBean();
        signalSourceConfig.setGearType(GearTypeEnum.NULL_GEAR);
        signalSourceConfig.setRoverStationType(RoverStationEnum.NO_CARD_ROVER_STATION);
        signalSourceConfig.setSpeedType(SpeedTypeEnum.OBD);
        signalSourceConfig.setLocationType(LocationTypeEnum.EXTERNAL);
        signalSourceConfig.setCarType(CarTypeEnum.C1_MODEL);
        signalSourceConfig.setCarModelId("");
        signalSourceConfig.setMpDevice(true);
        return signalSourceConfig;
    }

    public GearTypeEnum getGearType() {
        return gearType;
    }

    public void setGearType(GearTypeEnum gearType) {
        this.gearType = gearType;
    }

    public RoverStationEnum getRoverStationType() {
        return roverStationType;
    }

    public void setRoverStationType(RoverStationEnum roverStationType) {
        this.roverStationType = roverStationType;
    }

    public SpeedTypeEnum getSpeedType() {
        return speedType;
    }

    public void setSpeedType(SpeedTypeEnum speedType) {
        this.speedType = speedType;
    }

    public LocationTypeEnum getLocationType() {
        return locationType;
    }

    public void setLocationType(LocationTypeEnum locationType) {
        this.locationType = locationType;
    }

    public CarTypeEnum getCarType() {
        return carType;
    }

    public void setCarType(CarTypeEnum carType) {
        this.carType = carType;
    }

    public Integer getObdModel() {
        return obdModel;
    }

    public void setObdModel(Integer obdModel) {
        this.obdModel = obdModel;
    }

    public String getCarModelId() {
        if (StringUtils.isEmpty(carModelId)) carModelId = "";
        return carModelId;
    }

    public void setCarModelId(String carModelId) {
        this.carModelId = carModelId;
    }

    public boolean isMpDevice() {
        return isMpDevice;
    }

    public void setMpDevice(boolean mpDevice) {
        isMpDevice = mpDevice;
    }
}
